home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgramD2.iso / Visual Database / Visual Foxpro 6.0 (Ent. Edition) / Vf6ent Extractor.EXE / TOOLS / XSOURCE / XSOURCE.ZIP / vfpsource / Coverage / COV_TUNE.H < prev    next >
Encoding:
Text File  |  1998-05-01  |  8.3 KB  |  206 lines

  1. * COV_TUNE.H
  2. * Default/tunable option settings for Coverage app
  3.  
  4. * reference variable for the formset:
  5. #DEFINE COV_PUBLIC_VARIABLE         _oCoverage
  6.  
  7. * class to instance:
  8. #DEFINE COV_CLASS_TO_INSTANCE       "cov_standard"
  9. #DEFINE COV_CLASS_CLASSLIB          "COVERAGE.VCX"
  10.  
  11. * forms in use by the cov_standard interface:
  12. #DEFINE COV_MAINFORM                "cov_maindialog_standard"
  13. #DEFINE COV_ZOOMFORM                "cov_zoomdialog"
  14. #DEFINE COV_MAINFORM_CLASSLIB       "COVERAGE.VCX"
  15. #DEFINE COV_ZOOMFORM_CLASSLIB       "COVERAGE.VCX"
  16. * The two form classes must descend from 
  17. * cov_maindialog_standard and
  18. * cov_zoomdialog,
  19. * or cov_standard will refuse to instantiate.
  20.  
  21. * modal dialogs in use by the cov_standard interface:
  22. #DEFINE COV_STATISTICSDIALOG          "cov_statisticsdialog"
  23. #DEFINE COV_STATISTICS_CLASSLIB       "COVERAGE.VCX"
  24. #DEFINE COV_OPTIONSDIALOG             "cov_optionsdialog"
  25. #DEFINE COV_OPTIONS_CLASSLIB          "COVERAGE.VCX"
  26. #DEFINE COV_ADDINDIALOG               "cov_addindialog"
  27. #DEFINE COV_ADDIN_CLASSLIB            "COVERAGE.VCX"
  28.  
  29. * default profile marking:
  30. #DEFINE COV_PROFILE_EXECUTED_SPACING 12
  31. #DEFINE COV_PROFILE_STATS_SPACING    12
  32.  
  33. * default coverage marking
  34. #DEFINE COV_DEFAULT_MARKEXECUTED     ""
  35. #DEFINE COV_DEFAULT_MARKNOTEXECUTED  "|"+SPACE(3)
  36. #DEFINE COV_DEFAULT_MARKSPACING      5
  37.  
  38. * default fonts:
  39. #DEFINE COV_DEFAULT_BASE_FONTNAME   "MS San Serif"
  40. #DEFINE COV_DEFAULT_MONO_FONTNAME   "Courier New"
  41. * these defaults will be overwritten by registry
  42. * (trace window and standard Font properties) or
  43. * if available resource file entries
  44.  
  45. * suffixs for default savenames for coverage result tables:
  46. #DEFINE COV_SKIPFILEDBF_SUFFIX       "_SKIP"
  47. #DEFINE COV_TARGETDBF_SUFFIX         "_COV"
  48.  
  49. #DEFINE COV_USE_OCXS                .T.
  50. #DEFINE COV_TOPSPEED                .F.
  51. * Make this one .T. if you want a fast, in-line call
  52. * while Coverage parses your code.
  53. * Using the method call, OTOH, gives you more
  54. * scope for formatting the marks:
  55. #IF COV_TOPSPEED
  56.     #DEFINE COV_MARK_CODE_LINE      IIF(THIS.lInProfileMode, ;
  57.                                         IIF(ISNULL(iExecuted), ;
  58.                                             SPACE(30), ;
  59.                                             STR(iExecuted,10,0)+ ;
  60.                                             STR(nFirst,10,3)+STR(nAverage,10,3)), ;
  61.                                         IIF(ISNULL(iExecuted), ;
  62.                                             SPACE(LEN(THIS.cMarkExecuted)), ;
  63.                                             IIF(iExecuted > 0, ;
  64.                                                 THIS.cMarkExecuted, ;
  65.                                                 THIS.cMarkNotExecuted)) ) + ;
  66.                                      SPACE(4) + ;
  67.                                      cRealLine
  68. #ELSE
  69.     #DEFINE COV_MARK_CODE_LINE      THIS.MarkCodeLine(cRealLine,iExecuted, nFirst, nAverage)
  70. #ENDIF
  71.  
  72.  
  73. * The following item is used for SET MEMOWIDTH in the Coverage 
  74. * private data session.
  75. * The Coverage engine uses MLINE(), MEMLINES(), and _MLINE to parse
  76. * lines of source code.
  77. * Note: this figure is the command line limit, and SET MEMOWIDTH
  78. * limit, in VFP 6. In VFP 5, SETting MEMOWIDTH TO this value still 
  79. * results in a setting of 1024 (the VFP 5 command and SET MEMOWIDTH
  80. * limit).
  81. * You can change this setting manually in the Coverage data session
  82. * any time you like.... unless you write *lines without 
  83. * continuation/concatenation* that are extremely long, 
  84. * you do not need this high a limit --  and you may find that 
  85. * leaving it at this setting uses slightly more memory than necessary.
  86. * (Remember that we're not talking about macro-expanded SELECT statements,
  87. * here, but rather the length of the actual code lines you *type*.)
  88. * When figuring your longest lines of code, take a look at the length
  89. * of your object and procedure names
  90. * This figure is set at the outside limit for safety's sake.
  91. #DEFINE COV_MEMOWIDTH                 8192
  92.  
  93. * The following items define the length of 
  94. * character fields in the source and target cursors.
  95. * Their default values (115 each) are defined by
  96. * max length concatenated key,
  97. * since two of these may be used together.
  98. *
  99. * To conserve disk space, especially in the source
  100. * cursor and its CDX, you may reduce the size
  101. * of these fields if you wish.  However,
  102. * use care, or errors will occur
  103. * when filenames or object/container
  104. * information is truncated, as described below.
  105.  
  106. * As in the COV_MARK_CODE_LINE item above,
  107. * these items are defined in two ways, depending
  108. * on the setting of COV_TOPSPEED.  Setting 
  109. * COV_TOPSPEED .T. will give you the fastest possible
  110. * execution, since these #DEFINEs will resolve to a 
  111. * literal.  By contrast, when COV_TOPSPEED is .F.,
  112. * (the default value of this #DEFINE), 
  113. * these #DEFINEs resolve to coverage engine properties,
  114. * which means they take a little longer to execute but
  115. * can be tweaked dynamically, for example when you know
  116. * you are about to open a very large log.
  117.  
  118. * Whether you change these values in the #DEFINEs or
  119. * in the property values, be mindful of the following
  120. * conditions:
  121.  
  122. * If you choose to increase any of these values, 
  123. * don't make the sum of any two of them over 240,
  124. * to avoid potential max key length problems.
  125.  
  126. * If you choose to decrease any of these values, to
  127. * conserve diskspace, avoid decreasing Hostfile unless
  128. * you are sure the lengths of your fully-qualified 
  129. * source files will not be exceeded. Otherwise,
  130. * you may receive errors when the Profiler tries
  131. * to find the uncompiled versions of these files.  
  132.  
  133. * Whether you decrease ObjClass, Executing, or both,
  134. * be sensible. If you know you nest pageframes and
  135. * grids several container-layers deep, or that
  136. * you tend to use very long class names, try to
  137. * stay above the maximum string these fields 
  138. * are likely to contain, plus a margin for error.
  139. * You may want to examine the source and target files
  140. * first, to see how the engine uses these fields.
  141. * Be on the lookout for suddenly-incorrect 
  142. * Coverage and Profiling statistics,
  143. * even though you may receive no obvious errors when
  144. * when the Profiler analyzes the log.
  145. * Statistical errors will occur if object and method names 
  146. * are being truncated in the fields.
  147.  
  148. #IF COV_TOPSPEED
  149.  
  150.    #DEFINE COV_LEN_HOSTFILE            115
  151.    #DEFINE COV_LEN_OBJCLASS            115
  152.    #DEFINE COV_LEN_EXECUTING           115
  153.  
  154. #ELSE
  155.  
  156.    #DEFINE COV_LEN_HOSTFILE            THISFORMSET.iLenHostFile
  157.    #DEFINE COV_LEN_OBJCLASS            THISFORMSET.iLenObjClass
  158.    #DEFINE COV_LEN_EXECUTING           THISFORMSET.iLenExecuting
  159.  
  160. #ENDIF
  161.  
  162.  
  163. #DEFINE COV_LINES_TO_VALIDATE       100
  164. #DEFINE COV_POINT_SETTING           "."
  165.  
  166. * The following item is the report form in use 
  167. * by the cov_standard.DisplayProjectStatistics()
  168. * method. 
  169. * Note that this method is abstract in the cov_engine class.
  170. * It is called by cov_engine.ShowProjectStatistics() after 
  171. * cov_engine.GetProjectStatistics(), which serves to
  172. * create a cursor containing the appropriate information.
  173. * You can use a different FRX, and recompile COVERAGE.APP,
  174. * to change cov_standard's display of this cursor,
  175. * or you can subclass cov_engine with a different 
  176. * .DisplayProjectStatistics() method that doesn't 
  177. * use a REPORT FORM mechanism at all.
  178. * Refer to cov_engine.GetProjectStatistics() to 
  179. * the makeup of the project statistics cursor.
  180. #DEFINE COV_PROJECT_FRX             "COV_PJX.FRX"
  181.  
  182. * debugging:
  183. #DEFINE COV_DEBUG                    .F.
  184. #DEFINE COV_TIMEOUT_SECS             2
  185. #IF COV_DEBUG
  186.  
  187.     #DEFINE COV_DEBUG_MESSAGE        WAIT WINDOW LEFT(MESSAGE()+C_CR+;
  188.                                                       SYS(2018)+C_CR+;
  189.                                                       cMethod+C_CR+;
  190.                                                       MESSAGE(1),COV_MESSAGE_LIMIT) ;
  191.                                           TIMEOUT COV_TIMEOUT_SECS
  192.     #DEFINE COV_DEBUG_ACTION         ERROR nError
  193.     #DEFINE COV_ENGINE_ERROR_DEFAULT NOTE
  194.  
  195. #ELSE
  196.  
  197.     #DEFINE COV_DEBUG_MESSAGE        MESSAGEBOX(COV_PROBLEM_LOC+":"+C_CR+;
  198.                                                 MESSAGE()+C_CR+;
  199.                                                 cMethod,COV_STOP_MESSAGEBOX)
  200.     #DEFINE COV_DEBUG_ACTION         NOTE
  201.     #DEFINE COV_ENGINE_ERROR_DEFAULT THIS.Release()
  202.  
  203. #ENDIF
  204.  
  205.  
  206.